package de.zainodis.triplog.data.share;

import android.provider.BaseColumns;

/**
 * Created by fzarrai on 9/9/2014.
 */
@Deprecated
//TODO move code to contract or weatherprovider, then delete this class
public class WeatherEntryPersister implements BaseColumns {


    /**
     * The table name for a WeatherEntry.
     */
    public static final String TABLE_NAME = "weather";

    /**
     * Id of the weather table.
     */
    public static final String COLUMN_ID = "location_id";

    /**
     * Column with the foreign key into the location table.
     */
    public static final String COLUMN_LOC_KEY = "location_id";
    /**
     * Date, stored as Text with format yyyy-MM-dd
     */
    public static final String COLUMN_DATETEXT = "date";
    /**
     * Weather id as returned by API, to identify the icon to be used
     */
    public static final String COLUMN_WEATHER_ICON_ID = "icon_id";
    /**
     * Short description and long description of the weather, as provided by API.  e.g "clear" vs "sky is clear".
     */
    public static final String COLUMN_DESCRIPTION = "description";
    /**
     * Min and max temperatures for the day (stored as floats).
     */
    public static final String COLUMN_MIN_TEMP = "min";
    public static final String COLUMN_MAX_TEMP = "max";
    /**
     * Humidity is stored as a float representing percentage.
     */
    public static final String COLUMN_HUMIDITY = "humidity";
    /**
     * Windspeed is stored as a float representing windspeed mph.
     */
    public static final String COLUMN_WIND_SPEED = "wind";
    /**
     * Degrees are meteorological degrees (e.g, 0 is north, 180 is south). Stored as floats.
     * Relevant for the wind.
     */
    public static final String COLUMN_DEGREES = "degrees";


    /**
     * Projection of all available columns
     */
    public static final String[] WEATHER_COLUMNS = {
            /*We need to provide a fully qualified id for the weather table */
            TABLE_NAME + "." + _ID,
            COLUMN_DATETEXT,
            COLUMN_DESCRIPTION,
            COLUMN_MAX_TEMP,
            COLUMN_MIN_TEMP,
            COLUMN_WEATHER_ICON_ID,
            COLUMN_HUMIDITY,
            COLUMN_WIND_SPEED,
            COLUMN_DEGREES
    };

    /*Matching indices for  WEATHER_COLUMNS projection */
    public static final int COLUMN_INDEX_ID = 0;
    public static final int COLUMN_INDEX_DATE = 1;
    public static final int COLUMN_INDEX_DESCRIPTION = 2;
    public static final int COLUMN_INDEX_MAX_TEMP = 3;
    public static final int COLUMN_INDEX_MIN_TEMP = 4;
    public static final int COLUMN_INDEX_ICON_ID = 5;
    public static final int COLUMN_INDEX_HUMIDITY = 6;
    public static final int COLUMN_INDEX_WIND_SPEED = 7;
    public static final int COLUMN_INDEX_DEGREES = 8;


}
